using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NUnit.Framework;

using DataAccess;
using Business;
using DataTransferObject;
namespace TEST
{
    class TestBoPhan
    {
        clsBoPhanBUS bophanBUS = new clsBoPhanBUS();
        clsBoPhanDTO bophanDTO = new clsBoPhanDTO();

       #region Kiểm Tra Bộ Phận
        [Test]
        public void kiemtraMaBP()
        {
            Assert.IsTrue(kiemtrama(""));
        }
        public bool kiemtrama(string mabp)
        {
            BoPhanBUSResult rs = new BoPhanBUSResult();
            bophanDTO.MaBP = mabp;
            rs = bophanBUS.KiemTraRong(bophanDTO);
            if (rs == BoPhanBUSResult.MABPERROR)
                return false;
            return true;
        }
        [Test]
        public void kiemtraTenBP()
        {
            Assert.IsTrue(kiemtraten(""));
        }
        public bool kiemtraten(string tenbp)
        {
            BoPhanBUSResult rs = new BoPhanBUSResult();
            bophanDTO.TenBP = tenbp;
            rs = bophanBUS.KiemTraRong(bophanDTO);
            if (rs == BoPhanBUSResult.TENBPERROR)
                return false;
            return true;
        }
        #endregion
    }
}
